package com.tangcco.lockwell.config;

import com.aliyun.dysmsapi20170525.Client;
import com.aliyun.teaopenapi.models.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SendSmsConfig {
    public static String accessKeyId = "LTAI5t81ZWchY2SbLSGQ1r33";
    public static String accessKeySecret = "RPV373Ym8t9zmIc5wg08GhSZP8J3eX";

    @Bean
    public Client smsClient() throws Exception {
        Config config = new Config()
                .setAccessKeyId(accessKeyId)
                .setAccessKeySecret(accessKeySecret);
        config.endpoint = "dysmsapi.aliyuncs.com";

        return new Client(config);
    }
}